package com.rui.cn.provider.controller.system;

import com.rui.cn.provider.service.system.SysRolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/sysrolepermis")
public class SysRolePermissionController {

    @Autowired
    private SysRolePermissionService sysRolePermissionService;

    @PostMapping(value = "/saveRolePermiss")
    public Integer saveRolePermiss(@RequestParam("ids") Integer[] ids, @RequestParam("roleid") Integer roleid){
        return sysRolePermissionService.saveRolePermiss(ids,roleid);
    }

    @DeleteMapping(value = "/deleteByMap")
    public void deleteByMap(@RequestBody Map<String, Object> map){
        sysRolePermissionService.deleteByMap(map);
    }
}
